On Desugaring Polymorphic Lets
نویسندگان
چکیده
Existing type literature has conflicting views on desugaring polymorphic lets to lambda terms. The conflict arises because, in certain cases, desugaring does not preserve typing. We describe a transformation of polymorphic lets to monomorphic lets such that, when the monomorphic lets are desugared, the typing is preserved. Our transformation requires no changes to either term or type syntax. This transformation is used, in our past works, as a semantic tool for completeness and soundness of an extension to Wand’s algorithm to handle polymorphic let.
منابع مشابه
Desugaring JML Method Specifications
JML, which stands for “Java Modeling Language,” is a behavioral interface specification language (BISL) designed to specify Java modules. JML features a great deal of syntactic sugar that is designed to make method specifications more expressive. This paper presents a desugaring process that boils down all of the syntactic sugars in JML method specifications into a much simpler form. This desug...
متن کاملPLDI: U: Type Assisted Synthesis of Recursive Transformers on Algebraic Datatypes
As programming languages are being developed to be used in a wide range of industrial applications, it is necessary to introduce convenience language constructs that abstract a lot of the underlying low-level code. For example, the for statement in languages like Java and C is a convenience construct that can be purely expressed in terms of the while statement. Compilers for these languages, ho...
متن کاملSynthesis of Recursive ADT Transformations from Reusable Templates
Recent work has proposed a promising approach to improving scalability of program synthesis by allowing the user to supply a syntactic template that constrains the space of potential programs. Unfortunately, creating templates often requires nontrivial effort from the user, which impedes the usability of the synthesizer. We present a solution to this problem in the context of recursive transfor...
متن کاملTwo Results on Set-Theoretic Polymorphism
Moggi and Hyland showed how to model various polymorphic A-calculi inside the effective topos and other rea~zability toposes; types are modelled by the so-called modest sets, which form an internal category Mod in the topos that is, in a certain sense, complete. Polymorphic types are modelled as products indexed by the object of modest sets. The same idea lets us model polymorphism in reflectiv...
متن کاملPouring Liquids: A Study in Commonsense Physical Reasoning: Appendix: Verification of Pouring Scenario
The formal statements of the lemmas in this appendix, like the axioms in the main text of the paper, are (intended to be) written in a style that could be given directly to an automated theorem checker, after some straightfoward syntactic desugaring. In the text of the proofs here, by contrast, I have followed the (God knows, rigid enough) comparatively informal style of normal mathematical wri...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008